package cn.practice.chat.feign.service;

import cn.practice.chat.lang.Result;
import cn.practice.chat.response.user.LoginUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @ClassName UserDetailFeign
 * @Description:
 * @Author A-TAO
 * @Date 2022/10/31
 * @Version V1.0
 **/
@FeignClient(value = "user-server", contextId = "userDetailFeign")
public interface UserDetailFeign {

    /**
     * 登录成功之后返回用户信息给前端
     */
    @GetMapping("/feign/getUser")
    Result<LoginUser> getUser(@RequestParam("username") String username);
}
